package com.xiaotao.mapper;

import com.xiaotao.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * OrderDetailMapper继承基类
 */
@Mapper
@Repository
public interface OrderDetailMapper extends MyBatisBaseDao<OrderDetail, Integer> {
    // 根据订单ID查询所有订单详情
    List<OrderDetail> selectOrderDetailsByOrderId(@Param("orderId") String orderId);

    // 插入多个订单详情
    int insertBatch(@Param("list") List<OrderDetail> orderDetails);
}